<?php $tpPessoa = $_SESSION["SisesporteAdmin"]->storage["user"]->inTipoPessoa; ?>
<!-- Botões -->
<div class="row-fluid" id="divPrint">
    <div class="span2 action-btn round-all">
        <a title="Imprimir">
            <div><i class="icon-print"></i></div>
            <div><strong>Imprimir</strong></div>
        </a>
    </div>
</div>

<!-- Fim Botões -->
<!-- Table -->
<div class="row-fluid">      
    <div class="span12">
        <!-- Portlet: Browser Usage Graph -->
        <div class="box" id="box-0">
            <h4 class="box-header round-top">Relatório / Vagas em Aberto por Turma
                <a class="box-btn" title="close"><i class="icon-remove"></i></a>
                <a class="box-btn" title="toggle"><i class="icon-minus"></i></a>     
                <a class="box-btn" title="config" data-toggle="modal" href="#box-config-modal"><i class="icon-cog"></i></a>
            </h4>         
            <div class="box-container-toggle">
                <div class="box-content">
                    <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered bootstrap-datatable" id="datatable">
                        <thead>
                            <tr>
                                <th>ID</th>
                                <th>Código</th>
                                <th>Modalidade</th>
                                <th>Professor</th>
                                <th>Horário</th>
                                <th>Faixa Etária</th>
                                <th>N Vagas</th>
                                <th>Nível</th>
                                <th>Situacao</th>
                                <th>Teste</th>
                                <th>Período</th>
                                <th>status</th>
                                <th>Ações</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php
                            foreach ($this->data as $entity):
                                ?>
                                <tr>
                                    <td class="center"><?php echo $entity->getSqTurma(); ?></td>
                                    <td class="center"><?php echo $entity->getCoTurma(); ?></td>
                                    <td class="center"><?php echo $entity->getSqModalidadeProfessor()->getSqModalidade()->getNoModalidade(); ?></td>
                                    <td class="center"><?php echo $entity->getSqModalidadeProfessor()->getSqPessoa()->getSqPessoa()->getNoPessoa(); ?></td>
                                    <td class="center"><?php echo $entity->getSqHorarioInicio()->getNoHorario() . " às " . $entity->getSqHorarioTermino()->getNoHorario() ?></td>
                                    <td class="center"><?php echo $entity->getSqTipoFaixaEtaria()->getNoTipoFaixaEtaria(); ?></td>
                                    <td class="center"><?php echo $entity->getNuVaga(); ?></td>
                                    <td class="center"><?php echo $entity->getSqNivel()->getNoNivel(); ?></td>
                                    <td class="center"><?php echo $entity->getSqSituacaoTurma()->getNoSituacaoTurma(); ?></td>
                                    <td class="center">
                                        <span class="badge <?php echo ($entity->getInPreTeste() == 1) ? "badge-success" : "" ?>">
                                            <?php echo ($entity->getInPreTeste() == 1) ? "Sim" : "Não"; ?>
                                        </span>
                                    </td>
                                    <td class="center"><?php echo $entity->getInSemestre() . "º/" . $entity->getNuAno(); ?></td>
                                    <td class="center">
                                        <span class="badge <?php echo ($entity->getStAtivo() == 1) ? "badge-success" : "" ?>">
                                            <?php echo ($entity->getStAtivo() == 1) ? "Ativo" : "Inativo"; ?>
                                        </span>
                                    </td>
                                    <td class="center">                                        
                                        <a class="btn btn-primary" href="<?php echo $this->url('sisesporte-admin-interna', array('controller'=>'vagas-turma','action'=>'view','id'=>$entity->getSqTurma())); ?>">
                                            <i class="icon-plus icon-white"></i>
                                            Detalhes
                                        </a>                                        
                                    </td>
                                </tr>                            
                            <?php endforeach; ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="/js/sisesporte-admin/aluno/view.js"></script>